import config from "@/config"
import http from "@/utils/request"

export default {
	goodsList: {
		url: `${config.API_URL}/merchant/integralGoods/index`,
		name: "获取积分商品列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	addGoods: {
		url: `${config.API_URL}/merchant/integralGoods/add`,
		name: "添加积分商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	editGoods: {
		url: `${config.API_URL}/merchant/integralGoods/edit`,
		name: "编辑积分商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	getEditGoodsInfo: {
		url: `${config.API_URL}/merchant/integralGoods/edit`,
		name: "获取积分商品列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	delGoods: {
		url: `${config.API_URL}/merchant/integralGoods/del`,
		name: "删除积分商品",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	orderList: {
		url: `${config.API_URL}/merchant/integralOrder/index`,
		name: "积分订单列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	getExpressInfo: {
		url: `${config.API_URL}/merchant/integralOrder/express`,
		name: "获取物流信息",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	express: {
		url: `${config.API_URL}/merchant/integralOrder/express`,
		name: "订单发货",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	orderDetail: {
		url: `${config.API_URL}/merchant/integralOrder/detail`,
		name: "获取订单详情",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	completeOrder: {
		url: `${config.API_URL}/merchant/integralOrder/complete`,
		name: "完成订单",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	shelf: {
		url: `${config.API_URL}/merchant/integralGoods/shelf`,
		name: "上下架",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	}
}
